package org.langqiao.string.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class regex {
	public static String replaceBlank(String str){
		String dest="";
		if(str!=null){
			Pattern p = Pattern.compile("\\s*|\r|\t|\n");//空格、换行、制表符、回车
			Matcher m = p.matcher(str);
			dest = m.replaceAll("");		
		}
		return dest;
	}
	public static void main(String[] args){
		System.out.println(regex.replaceBlank(" just do  it !"));
	}

}
